package datastructuur;

import java.util.ArrayList;

public class Alternatief {
	private ArrayList<Term> termen = new ArrayList<Term>();
	
	public Alternatief(){
		
	}
	public void addTerm(Term term){
		termen.add(term);
	}
	
	public Term getTerm(int i){
		return termen.get(i);
	}
	
	public ArrayList<Term> getTermen(){
		return termen;
	}
	
	public boolean contains(NonTerminal t)
	{
		boolean contains = false;
		for(Term t2 : termen)
		{
			contains |= t.getNaam().equals(t2.getNaam());
		}
		return contains;
	}
	
	public String toString()
	{
		String s = "";
		
		for(Term t : termen)
		{
			s+= t.toString() + " ";
		}
		
		return s;
	}
}
